﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MockCommon;
using System.Globalization;

namespace Presentation
{
    public partial class Error : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Application["error"] != null)
            {
                MockException exception = (MockException)Application["error"];
                ContentLabel.Text = String.Format(CultureInfo.CurrentCulture, "<center>{0}<br/> on {1}<br/>came from {2}</center>",
                                                  exception.ExceptionMessage,
                                                  exception.ExceptionDate.ToString("dd-MM-yyyy hh:mm:ss", CultureInfo.CurrentCulture),
                                                  exception.ExceptionCausedIn);
            }
        }
    }
}